/**
 * @desc   运营
 * @param  {String}
 * @return {Boolean} 
 */
/* layout */
import Layout from '../views/layout/Layout';

/* logiLayout */
const logiLayout = resolve => require(['../views/layout/logiLayout'], resolve);

//教学-----资源管理
const resourceMange = resolve => require(['../views/teaching/resourceMange/resourceMange'], resolve); //资源管理列表
const coursewareMange = resolve => require(['../views/teaching/coursewareMange/coursewareMange'], resolve); //课件管理列表
const itemBankMange = resolve => require(['../views/teaching/itemBankMange/itemBankMange'], resolve); //题库管理列表
const checkItemBank = resolve => require(['../views/teaching/itemBankMange/checkItemBank'], resolve); //查看题库
const problemManage = resolve => require(['../views/teaching/problemManage/problemManage'], resolve); //题目纠错列表
const problemEdit = resolve => require(['../views/teaching/problemManage/problemEdit'], resolve); //题目纠错

// 教学
export const teachingRouterMap = [{
        path: '/',
        redirect: '/resourceMange',
        name: '教学',
        hidden: true
    },
    {
        path: '/resourceMange',
        component: Layout,
        redirect: '/resourceMange/list',
        name: '资源管理',
        icon: 'tubiaoleixingzhengchang',
        noDropdown: true,
        children: [
            { path: 'list', component: resourceMange },
        ]
    },
    {
        path: '/coursewareMange',
        component: Layout,
        redirect: '/coursewareMange/list',
        name: '课件管理',
        icon: 'zonghe',
        noDropdown: true,
        children: [
            { path: 'list', component: coursewareMange },
        ]
    },
    {
        path: '/itemBankMange',
        component: Layout,
        redirect: '/itemBankMange/list',
        name: '题库管理',
        icon: 'EXCEL',
        noDropdown: true,
        meta: {
            cache: 'itemBankMange'
        },
        children: [
            { path: 'list', component: itemBankMange },
            { path: 'checkItemBank/:id?/:subId?', component: checkItemBank, name: '查看题库' },
        ]
    },
    {
        path: '/problemManage',
        component: Layout,
        redirect: '/problemManage/list',
        name: '题目纠错',
        icon: 'EXCEL',
        noDropdown: true,
        meta: { role: ['admin', 'boss'], cache: 'problemManage' },
        children: [
            { path: 'list', component: problemManage }
        ]
    },
];

export default teachingRouterMap